package datamining.parsers;

import java.io.Serializable;
import java.text.ParseException;

/** 
 * 创建于 2012-11-14 下午11:03:26
 * 
 * @author xujinghu (jinghuxu@nudt.edu.cn)
 * 
 * 版权所有 2012 xujinghu
 * 
 * 许可证 Apache
 */
public interface LabelParser<LabelType> extends Serializable {

	/**
	 * @param text
	 * @return the label represented by the given text
	 * @throws ParseException
	 */
	public LabelType parse(String text) throws ParseException;

	/**
	 * @param label
	 * @return the string representing the given label
	 */
	public String serialize(LabelType label);

}
